home *** CD-ROM | disk | FTP | other *** search
- 1 rem loadstar polydiv
- 2 gosub20000
- 5 d$=""
- 10 print"[147]":poke53281,0
- 20 dim p1(8),p2(8),a(8),b(8),q(16)
- 25 fori=0to8:p1(i)=0:p2(i)=0:next
- 1000 print"[147]"
- 1005 print"'_' to [197][216][201][212]"
- 1010 print"[197][206][212][197][210] [217][207][213][210] [208][207][204][217][206][207][205][201][193][204]:"
- 1011 print:print"[198][207][210][205][213][204][193]: [208][207][204][217][206][207][205][201][193][204]#1"
- 1012 l$="--------------"
- 1013 printspc(12)l$
- 1014 print" [208][207][204][217][206][207][205][201][193][204]#2"
- 1015 print:print
- 1020 print"[197][216][193][205][208][204][197]: 3 2"
- 1030 print" 3[216] +2[216] -[216]+10"
- 1035 print"[206]o exponents greater than 8 are allowed."
- 1055 p=1
- 1060 gosub1999
- 1070 fori=0to8:p1(i)=a(i):next
- 1080 p=2:gosub1999
- 1090 fori=0to8:p2(i)=a(i):next
- 1100 print"[147]"
- 1110 v=3:p=1
- 1120 fori=0to8:b(i)=p1(i):next
- 1130 gosub3000
- 1135 print:print" [196][201][214][201][196][197][196][160][194][217]:"
- 1140 v=11:p=2
- 1150 fori=0to8:b(i)=p2(i):next
- 1160 gosub3000
- 1200 fori=8to0step-1:ifp1(i)=0thennext
- 1210 n1=i
- 1220 fori=8to0step-1:ifp2(i)=0thennext
- 1230 n2=i
- 1500 fori=0to16:q(i)=0:next
- 1505 q(n1)=p1(n1)
- 1510 fori=n1-1to0step-1
- 1515 q(i)=p1(i)
- 1520 forj=0ton2-1
- 1521 ifi<jthen1530
- 1525 q(i)=q(i)-p2(j)*q(i+n2-j)
- 1530 nextj:nexti
- 1532 :
- 1533 printleft$(d$,14);"[209][213][207][212][201][197][206][212] : ";:i1=n1:i2=n2:gosub1550
- 1534 printleft$(d$,19);"[210][197][205][193][201][206][196][197][210][160] : ";:i1=n2-1:i2=0:gosub1550
- 1535 printleft$(d$,23);"[193][206][207][212][200][197][210][160](y/n) ";
- 1536 poke198,0:wait198,1:geta$:ifa$="y"then1000
- 1537 ifa$="n"then1540
- 1538 goto1536
- 1539 :
- 1540 print"[147][193]re you sure you want to quit?"
- 1541 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"thenpoke53280,rnd(1)*15:goto1541
- 1542 ifa$="n"thenrun5
- 1543 print"[147]load"chr$(34)"hello"chr$(34)",8":print"run"
- 1544 poke631,13:poke632,13:poke198,2:end
- 1545 :
- 1546 :
- 1550 rem print the answer
- 1570 l=0:cl=0:fori=i1toi2step-1:fl=0
- 1580 j=i-i2
- 1590 ifq(i)=0then1630
- 1600 ifi<i1andq(i)>0thenprint"+ ";:l=l+2 :fl=1
- 1602 ifi<i1andq(i)<0thenl=l+2:fl=1
- 1605 ifi>i2andq(i)=1then1620
- 1610 printmid$(str$(q(i)),1);: l=l+len(str$(q(i)))
- 1620 ifj>0thenprint"[216]";:l=l+1: ifj>1thenprint"[145][157]";j;"";:l=l+2
- 1625 ifl>20andfl=1andcl=0thenprint: print:l=0:cl=1
- 1630 next
- 1650 print
- 1700 return
- 1997 :
- 1998 end
- 1999 fori=0to8:a(i)=0:next
- 2000 print""
- 2001 print"[208][207][204][217][206][207][205][201][193][204]#"p":":print
- 2002 print"--> ";:x=9:t=0:a2$=""
- 2003 ab$="":ac$="":aa=0
- 2005 ifa2$="-"thenab$="-"
- 2006 ifa2$="+"thenab$="+"
- 2009 poke198,0:wait198,1:geta1$:ifa1$="x"then2050
- 2010 ifa1$="-"andlen(ab$)=0then2020
- 2011 ifa1$=chr$(13)thenaa=1:ac$="0"
- 2012 ifa1$=chr$(13)then2110
- 2013 ifa1$="0"andval(ab$)<>0then2020
- 2014 ifa1$=chr$(95)then1540
- 2015 :
- 2016 ifval(a1$)=0then2009
- 2020 ab$=ab$+a1$:printa1$;:goto2009
- 2050 print"[216][145]";
- 2060 poke198,0:wait198,1
- 2070 geta2$:ifa2$="+"ora2$="-"then2100
- 2072 ifa2$=chr$(13)thenaa=1:goto2110
- 2073 ifa2$="0"andval(ac$)>0then2090
- 2074 ifa2$=chr$(27)then99:rem[pop]
- 2075 ifa2$=chr$(27)then1538
- 2080 ifval(a2$)=0then2070
- 2090 ac$=ac$+a2$:printa2$;:goto2070
- 2100 print"";
- 2101 printa2$;
- 2110 ifab$=""orab$="-"orab$="+"thenab$=ab$+"1"
- 2120 ifac$=""thenac$="1"
- 2125 ifval(ac$)>x-1then10000
- 2127 ifa(val(ac$))<>0then10000
- 2130 a(val(ac$))=val(ab$)
- 2135 x=val(ac$)
- 2136 ift=oandp=2andval(ab$)<>1thenprint:goto2540
- 2140 ifaa=1then2500
- 2150 t=1:goto2003
- 2500 print:print"[201]s this correct?";
- 2510 poke198,0:wait198,1:geta$:ifa$="y"ora$="n"then2530
- 2520 goto2510
- 2530 ifa$="y"thenprint"[145]"
- 2531 ifa$="y"thenprint" [145][145]";
- 2532 ifa$="y"thenreturn
- 2540 print"[145][145][145]":fori=0to3
- 2541 print" "
- 2542 next:print"[145][145][145][145][145][145][145][145]";:goto1999
- 3000 printleft$(d$,v);"[208][207][204][217][206][207][205][201][193][204] #"p": ";
- 3010 l=0:cl=0:fori=8to0step-1
- 3012 fl=0
- 3020 ifb(i)=0then3080
- 3030 ifi>0andabs(b(i))<>1thenprintmid$(str$(b(i)),1);:l=l+len(str$(b(i)))
- 3040 ifi>0thenprint"[216]";:l=l+1: ifi>1thenprint"[145][157]"i"";:l=l+1
- 3050 ifi>0thenifb(i-1)<0then l=l+2:fl=1
- 3060 ifi>0thenifb(i-1)>0thenprint"+ ";: l=l+2:fl=1
- 3070 ifi=0thenprintmid$(str$(b(i)),1);: l=l+len(str$(b(i)))
- 3075 ifl>20andfl=1andcl=0thenprint:print :l=0:cl=1
- 3080 next
- 3090 return
- 10000 print"":goto2540
- 20000 t$=" ":c=0:c$="":print"[147]":poke53281,0
- 20030 printspc(7)""t$:print spc(7)" [204][207][193][196][211][212][193][210] [208][207][204][217][196][201][214][201][211][201][207][206] [146]"
- 20051 printspc(7)""t$:print:printtab(18)"by"
- 20060 print:printspc(12)"[194]ryan [214]ekovius"
- 20065 print:print" [195]onverted to the [195]-64 by [193]lan [199]ardner"
- 20070 print:printspc(12)"[195]opyright 1985"
- 20080 print:print:print:print" [204][207][193][196][211][212][193][210] is not public domain."
- 20090 print:print" [208]lease respect the author's rights."
- 20100 print:print" [208]ress space bar to continue."
- 20110 forcc=1to48:getk$:ifk$=" "then20130
- 20120 ifcc=1thenprintmid$(c$,c+2,1)"[145][145]";:c=not(c)
- 20125 next:goto20100
- 20130 printc$:return
-